1. Field of the Invention
The present invention relates to an online transaction system and, more specifically, to a technique for overcoming bottleneck of the system and for improving the processing speed.
2. Description of the Related Art
Online transaction systems are frequently used for information systems of strong public nature, such as ATM (Auto Teller Machine) of financial institutions and seat reservation systems for trains. Therefore, it is always desired to achieve both the high reliability and promptness of the processing. Particularly, there must not be occurrence of data loss as well as delay and termination in operating the systems, etc.
FIG. 8 is an explanatory diagram showing an example of the structure of a typical multistage online transaction system 901 which inputs and outputs data in a form of file. The multistage online transaction system 901 is structured by mutually connecting a plurality of nodes which share NAS (Network Attached Storages) 970 and 980 via a network.
As the whole system, a final object thereof is to update a database 960 regarding data inputted from an external data input device 910. Servers (processes) 921-92n, 931-932, 941, 951-95m executing intermediate processing not making access to the database 960 record and read out data to/from the files on the NAS 970 and 980 by each transaction. The data recorded to the files on the NAS 970 and 980 is intermediate data for applications which perform different data processing on each of the servers 921-92n, 931-932, 941, 951-95m, and the files on the NAS 970 and 980 carry out a function of guaranteeing the data when the processing is ceased on a specific server.
The data inputted from the data input device 910 is processed by going through a plurality of nodes 920, 930, 940, 950, and inputted to the database 960 at last. Further, the node 920 and the node 930 use the NAS 970 for sharing the data, and the node 930, the node 940, and the node 950 use the NAS 980 for sharing the data.
Each of the nodes is configured with at least one server. In the case shown in FIG. 8, the node 920 is configured with n-pieces of servers 921-92n (n is a natural number), and the node 950 is configured with m-pieces of servers 951-95m (m is a natural number, m=n or m≠n). In the meantime, the node 930 is configured with two servers 931 and 932, while the node 940 is configured with a single server 941.
There are three kinds of forms in the servers configuring the multistage online transaction systems. Specifically, the server of the first form is a server which functions as an input of the entire system for receiving data from the data input device 910, and this server processes the data inputted from the data input device 910 and outputs the processed data as intermediate data as a file on the NAS 970. In the case shown in FIG. 8, the servers 921-92n configuring the node 920 correspond to this server.
The server of the second form performs processing by reading the data from the file on the NAS 970, and outputs the processed data to another file on the other NAS 980. The servers 931, 932, and 941 configuring the nodes 930 and 940 correspond to this server.
The server of the third form reads the data from the file on the NAS 980, and updates the contents of the database based on that data. The servers 951-95m configuring the node 950 correspond to this server.
As shown in FIG. 8, the server of the first form informs the data information such as the file position and the size of the data outputted on the NAS 970 at the time of committing a transaction to the sever of the second form as the output destination. Similarly, as shown in FIG. 8, the server of the second form informs the data information such as the file positions and the size of the data outputted on the NAS 980 at the time of committing a transaction to the sever of the third form which is the output destination.
The data information becomes a path for reading the files and also is utilized for determining the order and the priority to be the conditions regarding with which of the data a transaction is to be done. The data information is smaller in size compared to the data outputted to the NAS 970 and 980, so that it is normally transmitted directly to the destination server via a network as shown in FIG. 8 without employing a form of file. In FIG. 8, solid zigzag lines show the connecting relation of the network, solid arrows show the flows of data, and dotted-line arrows show the flows of the data information. In practice, the data and the data information are all exchanged via the network. All the arrows are illustrated to distinguish the flows of the data and the flows of the data information as a concept.
FIG. 9 is an explanatory diagram showing the internal structure of the nodes 920-940 shown in FIG. 8. The nodes 920-940 are all typical computer devices, and each of those includes: a CPU (Central Processing Unit) 1000 which executes computer programs; an HDD in which the computer programs executed by the CPU 1000 are stored; a RAM (Random Access Memory) in which the program read from the HDD by the CPU is temporarily stored; and a communication interface which performs communications with other computers and NAS via a telecommunications line.
The servers 921-92n, 931-932, 941, and 951-95m are built on software when the CPU 1000 executes the computer programs, as shown in FIG. 9. Each of the servers 921-92n, 931-932, 941, and 951-95m includes a data processor 1002, a commit processor 1003, a file access managing section 1004, a file access device 1005, a file input device 1006, a file search device 1007, an input data managing section 1008, a communication processor 1009, a data storage memory acquiring device 1010, a data output device 1011, a file commit device 1012, a data erasing device 1013, and a structure managing section 1014. Further, each of the servers 921-92n, 931-932, 941, and 951-95m includes a user application 1001 for executing the processing allotted respectively.
On the RAM, storage regions as process memories (buffers) 1102 are allotted for each server. Each server utilizes an execution queue 1101 which manages the inputted and outputted data in a “first in, first out” manner and a process memory as the buffer 1102 for temporarily storing the data when inputting and outputting the file.
The process memories 931m, 932m, and 941m shown in FIG. 10 correspond to the process memories 1102 which are prepared for the respective servers 931, 932, and 941 shown in FIG. 9.
When processing the data, first, the data processor 1002 calls the user application 1001. The user application 1001 receives input data from the data processor 1002, performs data processing inherent for the application, and gives the output data along with the output destination to the data processor 1002. The data processor 1002 executes the data storage memory acquiring device 1010 to acquire the storage region for storing the data on the process memory 1102, and copies the data to that region. The data output device 1011 outputs an instruction to the file access managing section 1004 for outputting the data stored in the process memory 1102 to the NAS 970 or 980. The file access managing section 1004 outputs the instruction for outputting the file to the NAS 970 or 980 to the execution queue 1101. Each of at least two of the file access devices 1005 monitors the data of the execution cure 1101, and outputs the data to the NAS 970 or 980. The structure managing section 1014 manages the operations of each structural element shown in FIG. 9.
At a stage of determining the outputted data (referred to as “commit”), the commit processor 1003 executes the file commit device 1012 when the user application 1001 completes the processing for all the data. The file commit device 1012 waits for completion of the out of the file to the NAS 980 done by the data output device 1011, commits the file, transfers the data information to the output-destination server, erases the data stored in the region of the processing memory 1102, and releases that region.
When completing the execution of the file commit device 1012 for all the output data, the commit processor 1003 executes the data erasing device 1013 for all the input data to which the processing has been done, erases the unnecessary file of the data stored in the NAS 970 or 980, and releases the region of the process memory 1102 where the unnecessary file is stored.
The communication processor 1009 which has received data information from another server gives the data information to the input data managing section 1008. The input data managing section 1008 schedules the data with which a next transaction is to be done based on the data information, executes the file input device 1006 for the target data, reads the data from the file on a path of the NAS 970 or 980 indicated by the data information, and stores that data to the region secured in the process memory 1102. When all the data as the target of the process is stored in the process memory 1102 by one-time transaction, the input data managing section 1008 gives the storing destinations of all the input data to the data processor 1002, and the data processor starts the above-described transaction from there.
FIG. 10 is an explanatory diagram showing an operation example of the multistage online transaction system 901 shown in FIG. 8-FIG. 9. Here, the data processing is started from a state where data 1 is already being stored in the process memory on the server 931 as the input data of the server 931. The data 1 is outputted from one of the servers 921-92n or the server 931 or 941. For explanations' sake, it may be the data outputted from any of those servers.
The server 931 reads the data 1 brought in the process memory as the input, and performs processing thereon (step S1201). The server 931 generates data 2 and data 3 by processing the data 1. Along with the output of the data to the server, the data information of that data is also transmitted to the target server. The server 941 generates data 4 by processing the data, and the server 932 generates data 5 from the received data 3 and data 4.
The server 931 once stores the data 2 and the data 3 on the own process memory 931m, and then outputs those to the NAS 980. That is, the server 931 first secures the storage region on the process memory 931m for the data 2 (step S1202), outputs the data 2 to that region (step S1203), and outputs the data to the NAS 980 thereafter (step S1204). File output is conducted asynchronously, so that the result thereof is not checked here. Similarly, for the data 3, the server 931 first secures the storage region on the process memory 931m (step S1205), stores the data 3 to that region (step S1206), and then outputs the data to the NAS 980 thereafter (step S1207).
When completing the processing of the data 1 and the data 2 as well as the data 3 are outputted to the NAS 980, the server 931 checks the output result. After checking the output result, the server 931 transmits the data information regarding the data 2 and the data 3 to the servers (servers 932 and 941) as the output-destination (steps S1208, S1209), and releases the regions of the data 2 and the data 3 on the process memory (steps S1210, 1211). Further, the server 931 erases the file of the data 1 on the NAS 980 (step S1212), and releases the storage region of the data 1 that has become unnecessary since the processing thereon has been completed (step S1213).
The server 941 receives the data information of the data 2 transmitted from the server 931 in step S1208, and secures the buffer 1102 on the own process memory 941m (step S1214). Thereafter, the server 941 reads the data 2 from the NAS 980 (step S1215). The server 941 starts the processing for generating the data 4 by processing the data 2 (Step S1216), secures the storage region for the data 4 on the own process memory 941m (step S1217), and in a state where the data 4 is stored in that region (step S1218), outputs the data 4 to the NAS 980 to have it stored (step S1219).
The server 941 checks the output result when outputting the data 4 to the NAS 980. After checking the output result, the server 941 transmits the data information of the data 4 to the server 932 (step S1220), releases the region of the data 4 on the process memory 941m (step S1221), erases the file of the unnecessary data 2 on the NAS 980 (step S1222), and releases the region of the data 2 on the process memory 941m (S1223).
After receiving the data information of the data 3 transmitted from the server 931 in step S1209, further receiving the data information of the data 4 transmitted from the server 941 in step S1220, and then securing the storage region of the data 3 on the own process memory 932m (step S1224), the server 932 reads the data 3 from the NA 980 (step S1225). Further, the server 932 secures the storage region of the data 4 on the process memory 932m (step S1226), reads the data 4 from the NAS 980 (step S1227), and stores the data 4 to the storage region.
The server 932 processes the data 3 and data 4 to generate the data 5 (step S1228), secures the storage region of the data 5 on the own process memory 932m (step S1229), and in a state where the data 5 is being stored in that region temporarily (step S1230), outputs the data 5 to the NAS 980 (step S1231).
The server 932 checks the output result when outputting the data 5 to the NAS 980. After checking the output result, the server 932 transmits the data information of the data 5 to the server 931 (step S1232), and releases the region of the data 5 on the process memory 932m (step S1233). Subsequently, the server 932 erases the file of the unnecessary data 3 on the NAS 980 (step S1234), and further releases the region of the data 3 on the process memory 932m (S1235). Further, the server 932 erases the file of the unnecessary data 4 on the NAS 980 (step S1236), and releases the region of the data 4 on the process memory 932m (S1237).
As literatures of the related techniques, there are following Patent Documents. Japanese Unexamined Patent Publication 2006-259981 (Patent Document 1) discloses a parallel batch processing system which executes processing at a high speed through executing data distribution processing and application processing in parallel, in particular a technique which reads in advance the input data of a next transaction during data processing other than an access to a disk device. Japanese Unexamined Patent Publication Hei 06-348740 (Patent Document 2) discloses a collective processing system which speeds up the execution through executing transaction processing by distributing it to a plurality of execution devices.
Japanese Patent No. 4104281 (Patent Document 3) discloses an online transaction system which lightens the load on the system by employing a structure which duplicates the disk, stops duplication processing and updates the other when a read access is being executed, and restarts the duplication processing at a point where the read access is ended.
With the multistage online transaction system 901 having the structure which inputs and outputs the data of transactions target, NAS becomes a large factor for the bottleneck of the transaction performance. The processing waiting action generated in NAS can be the bottleneck for the processing in the entire system.
In practice, an extremely greater number of servers execute the transactions for a greater number of pieces of data asynchronously than the operation shown as an example described in FIG. 8-FIG. 10. Thus, a great number of file accesses are made to the NAS. Load on the NAS generated by the transactions by a single server causes to other servers to wait for the processing, which results in delaying the transactions of the entire system. That is, the existence of the NAS can be the bottleneck.
In order to overcome such bottleneck, there may be considered to disperse the load by using a plurality of disk devices for the NAS. However, a great number of resources are required for that, so that the device may become of high price.
To replace the NAS not with the disk device but with on-memory type database is difficult in terms of the characteristics of the processing executed on the online transaction system, since the NAS also functions for guaranteeing the data as described above. Further, the number of data that can be handled with the on-memory type database depends on the capacity of the memory, so that it is difficult to secure the capacity as that of the disk device. Even if it is replaced with a hybrid-type database, all the records within a table are to be updated when updating data due to the characteristic of intermediate data. Thus, for guaranteeing the permanence of the data, it is necessary to save a large amount of logs that are equal to or more than the amount of files of the conventional case. Therefore, it is not practical.
Further, while the technique of Patent Document 1 improves throughput by saving the file input time through reading input data in advance, it does not lighten the load itself on the disk device. While the technique of Patent Document 2 executes transaction processing by distributing it to a plurality of execution devices, it does not decrease accesses to the disk device. While the technique of Patent Document 3 performs duplication processing of the disk device, it does not decrease the access itself to the disk device, either. That is, none of Patent Documents 1-3 described above lightens the load on the disk device (NAS).
An exemplary object of the present invention is to provide a multistage online transaction system, a server, a multistage online transaction processing method, and a program which can improve the processing speed by overcoming the bottleneck in the processing while keeping the reliability through decreasing accesses to NAS (shared storage).